<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>欢迎光临 Music Store</title>
<link type="text/css" rel="Stylesheet" href="style/front.css" />
</head>
<body>
	<div id="wrapper">
		<div id="header">
			<div id="header-logo">
				<a href="index.jsp"><img src="style/images/logo.png" alt=""></img>
				</a>
			</div>
			<div id="header-login">
				<a href="#">登录</a> | <a href="#">注册</a>
			</div>
			<div class="clearBoth"></div>
			<div id="header-search">
				<input id="keyword" type="text" /><input id="btnSearch"
					type="button" value="搜索" />
			</div>
			<div id="header-nav">
				<ul>
					<li><a href="#">首页</a>
					</li>
					<li><a href="#">商店</a>
					</li>
					<li><a href="#">购物车</a>
					</li>
					<li><a href="#">个人信息</a>
					</li>
				</ul>
				<label id="welcome">您好，Sam。</label>
			</div>
		</div>
		<div id="content">
			<div id="sidebar">
				<h3>唱片分类</h3>
				<form action="LoginServlet" method="get">
				<ul class="categories">
					<c:forEach items="${genre}" var="g" varStatus="vs">
					<c:if test="${vs.index%2==0 }">
						<li><a href="Album.jsp?gid=${g.id }" target="_self">${g.name }</a>
						</li>
					</c:if>
					<c:if test="${vs.index%2!=0 }">
						<li><a href="Album.jsp?gid=${g.id }" target="_self" class="even">${g.name }</a>
					</li>
					</c:if>
					</c:forEach>
				</ul>
				</form>
			</div>
			<div id="main">
				<h3 id="main-title">用户登录</h3>
				<form action="LoginServlet" method="post">
				<table>
				<tr>
				<td>用户名：</td>
				<td><input type="text" name="username" value="<%=request.getParameter("username")==null?"":request.getParameter("username") %>"/></td>
				</tr>
				<tr>
				<td>密码：</td>
				<td><input type="password" name = "password"/></td>
				</tr>
				<tr>
				<td></td>
				<td><input type="submit" value="登录"/> <a href="register.jsp">注册</a></td>
				</tr>
				<tr>
				<td></td>
				<td><label style="color:red"><%=request.getAttribute("error")==null?"":request.getAttribute("error") %></label></td>
				</tr>
				</table>
				</form>
			</div>
			<div class="clearBoth"></div>
		</div>
		<div id="footer">
			<div id="footer-ad">
				<img src="style/images/footer.png" alt=""></img>
			</div>
			<div id="footer-contactUs">
				<p>Music Store</p>
				<p>Design by Sam Chen, July,2011.</p>
			</div>
		</div>
	</div>
</body>
</html>

